<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>



<script type="text/javascript">
    function skip_amend(index,vehicleId) {
	//    $("#index").val(index);
	//    $("#sId").val(sId);
	top.Dialog.open({
	    URL : "admin/inner_car_amend.jsp?index="+index+"&vehicleId="+vehicleId,
	    Title : "修改车辆信息"
	});
    }

    function skip_delete(index,vehicleId) {
	//    var index_ = $("#index").val(index);
	//    var sId1= $("#sId").val(sId);
	top.Dialog.confirm("确定要删除吗",function(){
	    window.location="dInnerVehicle?vehicleId="+vehicleId}
	);

    }

    $(document).ready(function(){
	var a=null;
	a=<%=request.getParameter("p")%>;
	if(a==0){
		alert("删除失败！");
	}if(a==1){
		alert("删除成功！");
	}
});
</script>



<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--框架必需start-->
<script type="text/javascript" src="../js/jquery-1.4.js"></script>
<script type="text/javascript" src="../js/framework.js"></script>
<link href="../css/import_basic.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" id="skin" />
<!--框架必需end-->

<!--截取文字start-->
<script type="text/javascript" src="../js/text/text-overflow.js"></script>
<!--截取文字end-->

<!--修正IE6支持透明PNG图start-->
<script type="text/javascript" src="../js/method/pngFix/supersleight.js"></script>
<!--修正IE6支持透明PNG图end-->
</head>
<body>
	<div class="box_tool_mid padding_right5">
		<div class="center">
			<div class="left">
				<div class="right">
					<div class="padding_top8 padding_left10">
						<form action="qInnerVehicle!query" method="post">
							<table>
								<tr>

									<td>车辆类型：</td>
									<td><select id="type" name="type">
											<option value="not">请选择</option>
											<option value="越野">越野</option>
											<option value="轿车">轿车</option>
											<option value="大巴">大巴</option>
											<option value="中巴">中巴</option>
											<option value="小巴">小巴</option>
									</select>
									</td>
									<td>车牌号：</td>
									<td><input type="text" name="vehicleId" id="vehicleId" />
									</td>
									<td><input type="hidden" name="vehicleLevel"
										id="vehicleLevel" />
									</td>
									<td><input type="hidden" name="state" id="state" />
									</td>
									<td><input type="submit" name="查询" value="查询" />
									</td>
								</tr>
							</table>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div id="scrollContent" class="border_gray">
		<table class="tableStyle">

			<tr>
				<th width="15%">车牌号</th>
				<th width="15%">车辆类型</th>
				<th width="20%">车辆等级</th>
				<th width="15%">车辆状态</th>
				<th width="25%">车辆图片</th>
				<th width="10%">操作</th>
			</tr>
			<s:iterator value="innerVehicleList" status="status">
			<tr>
					<s:if test="vehicleId!='' && vehicleId!=null">
						<td><s:property value="vehicleId" /></td>
						<td><s:property value="type" />
						</td>
						<td><s:property value="vehicleLevel" />
						</td>
						<td>
						<s:if test="state=='notusing'">可以使用</s:if>
                        <s:elseif test="state=='applied'">已被申请</s:elseif>
                        <s:elseif test="state=='using'||state=='use'">正在使用</s:elseif>
                        <s:else>车辆维护中</s:else>
						</td>
						<td><s:property value="vehiclePicture" />
						</td>
						<td><span class="img_edit hand" title="修改"
							onclick="skip_amend('${status.index}','${vehicleId}')"> </span> <span
							class="img_delete hand" title="删除"
							onclick="skip_delete('${status.index}','${vehicleId}')"> </span></td>
					</s:if>
					</tr>
			</s:iterator>
		</table>
	</div>


	<div style="height:35px;">
		<div class="float_left padding5"></div>
		<div class="float_right padding5 paging">
			<div class="float_left padding_top4">
				<span class="paging_disabled"><a href="javascript:;">上一页</a>
				</span> <span class="paging_current"><a href="javascript:;">1</a>
				</span> <span><a href="javascript:;">2</a>
				</span> <span><a href="javascript:;">3</a>
				</span> <span><a href="javascript:;">4</a>
				</span> <span><a href="javascript:;">5</a>
				</span> <span>...</span> <span><a href="javascript:;">20</a>
				</span> <span><a href="javascript:;">下一页</a>
				</span>&nbsp;每页
			</div>
			<div class="float_left">
				<select autoWidth="true"><option>50</option>
					<option>100</option>
					<option>150</option>
				</select>
			</div>
			<div class="float_left padding_top4">条记录</div>
			<div class="clear"></div>
		</div>
		<div class="clear"></div>
	</div>
</body>
</html>